How Bacteria Outsmart Chemicals